fourier series of mod(cosx) in -pi to pi